#ifndef MATRIX_H
#define MATRIX_H

#include <3ds/types.h>

#define MAT44IDENTITY  { \
        {1.0f, 0.0f, 0.0f, 0.0f}, \
        {0.0f, 1.0f, 0.0f, 0.0f}, \
        {0.0f, 0.0f, 1.0f, 0.0f}, \
        {0.0f, 0.0f, 0.0f, 1.0f} \
    }

//ASM FUNCTIONS
void multMatrix44FPU(float m1[4][4], float m2[4][4], float mout[4][4]);

float transfByMatrix44FPU(float m1[4][4], float vec[3], float vecOut[3]); //returns W
float transfV4ByMatrix44FPU(float m1[4][4], float vec[4], float vecOut[3]); //returns W

//C FUNCTIONS
void rotByMatrix44FPU(float m1[4][4], float vec[3], float vecOut[3]);

void translateMatrixFPU(float m[4][4], float vec[3], float mout[4][4]);

void rotateMatrixXFPU(float m[4][4], float ang, float mout[4][4], int r);
void rotateMatrixYFPU(float m[4][4], float ang, float mout[4][4], int r);
void rotateMatrixZFPU(float m[4][4], float ang, float mout[4][4], int r);

#endif
